import http from "../http/index.js";
import config from "../config/index.js";

class carService {
	//示例
	async noviceList(data = {}, header = {}) {
		return await http.post({
			url: config.urlList.noviceList,
			data: data,
			header: header
		})
	};
	async articleContent(data = {}, header = {}) {
		return await http.post({
			url: config.urlList.articleContent,
			data: data,
			header: header
		})
	};
	async feedback_list(data = {}, header = {}) {
		return await http.post({
			url: config.urlList.feedback_list,
			data: data,
			header: header
		})
	};
	async feedback_detail(data = {}, header = {}) {
		return await http.post({
			url: config.urlList.feedback_detail,
			data: data,
			header: header
		})
	};
	async getFeedbake(data = {}, header = {}) {
		return await http.post({
			url: config.urlList.getFeedbake,
			data: data,
			header: header
		})
	};
	async contactSenior(data = {}, header = {}) {
		return await http.post({
			url: config.urlList.contactSenior,
			data: data,
			header: header
		})
	};
	async feedbackType(data = {}, header = {}) {
		return await http.post({
			url: config.urlList.feedbackType,
			data: data,
			header: header
		})
	};
	async projectInfo(data = {}, header = {}) {
		return await http.post({
			url: config.urlList.projectInfo,
			data: data,
			header: header
		})
	};
	async applyCode(data = {}, header = {}) {
		return await http.post({
			url: config.urlList.applyCode,
			data: data,
			header: header
		})
	};
	async teamIndex(data = {}, header = {}) {
		return await http.post({
			url: config.urlList.teamIndex,
			data: data,
			header: header
		})
	};
	async directTeam(data = {}, header = {}) {
		return await http.post({
			url: config.urlList.directTeam,
			data: data,
			header: header
		})
	};
	async teamPriceSetting(data = {}, header = {}) {
		return await http.post({
			url: config.urlList.teamPriceSetting,
			data: data,
			header: header
		})
	};
	async setUserPercentage(data = {}, header = {}) {
		return await http.post({
			url: config.urlList.setUserPercentage,
			data: data,
			header: header
		})
	};
	async setSettlementPrice(data = {}, header = {}) {
		// 价格判断
		let res = await http.post({
			url: config.urlList.measurePrice,
			data: data,
			header: header
		})
		console.log(res)
		if (res.code == 1) {
			return await http.post({
				url: config.urlList.setSettlementPrice,
				data: data,
				header: header
			})
		} else {
			return res
		}
	};
	async setSubPrice(data = {}, header = {}) {
		return await http.post({
			url: config.urlList.setSubPrice,
			data: data,
			header: header
		})
	};
	async showSettlementPrice(data = {}, header = {}) {
		return await http.post({
			url: config.urlList.showSettlementPrice,
			data: data,
			header: header
		})
	};













}
export default new carService()